package org.springblade.third.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springblade.third.dto.ThirdRequest;
import org.springblade.third.dto.ThirdResponse;
import org.springblade.third.service.ThirdInvokeService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "第三方统一调用")
@RestController
@RequestMapping("/third")
@RequiredArgsConstructor
public class ThirdController {

    private final ThirdInvokeService thirdInvokeService;

    @Operation(summary = "统一调用入口")
    @PostMapping("/invoke")
    public ThirdResponse<Object> invoke(@Valid @RequestBody ThirdRequest request) {
        return thirdInvokeService.invoke(request);
    }
}



